import service from '@/apis/request';
import { AxiosResponse } from 'axios';
import { BookInfo } from '@/types';

const findBookInfoByFlag = (
  marchFlag: string,
  info: string,
): Promise<AxiosResponse<BookInfo[]>> => {
  return service.get(`/book-info/${marchFlag}/${info}`);
};

const translateT2S = (info: string): Promise<AxiosResponse<string>> => {
  return service.get(`/book-info/utils/translate/${info}`);
};

export { findBookInfoByFlag, translateT2S };
